<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<div th:replace="~{fragment/headFragment :: head}"></div>
<body class="cbp-spmenu-push">
<div class="main-content">

    <div th:replace="~{fragment/left-border :: left}"></div>

    <div th:replace="~{fragment/header :: header}"></div>

    <div id="page-wrapper">
        <div class="main-page signup-page">
            <a th:href="@{/customerInfo/index(value='',current=${#request.getParameter('current')},size=5)}"><h3 class="title1"><< 修改客户信息</h3></a>
            <div class="sign-up-row widget-shadow">
                <form action="/customerInfo/doupdate" method="get">
                    <h5>Personal Information :</h5>
                    <input type="text" name="current" th:value="${#request.getParameter('current')}" style="display: none;">
                    <input type="text" name="size" th:value="${#request.getParameter('size')}" style="display: none;">
                    <input type="text" name="id" th:value="${customer.getId()}" style="display: none;">
                    <div class="sign-u">
                        <div class="sign-up1">
                            <h4>客户名称 :</h4>
                        </div>
                        <div class="sign-up2">
                            <input type="text" name="customername" th:value="${customer.getCustomername()}">
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="sign-u">
                        <div class="sign-up1">
                            <h4>真实姓名 :</h4>
                        </div>
                        <div class="sign-up2">
                            <input type="text" name="realname" th:value="${customer.getRealname()}">
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="sign-u">
                        <div class="sign-up1">
                            <h4>联系电话 :</h4>
                        </div>
                        <div class="sign-up2">
                            <input type="text" name="phone" th:value="${customer.getPhone()}">
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="sign-u">
                        <div class="sign-up1">
                            <h4>邮箱 :</h4>
                        </div>
                        <div class="sign-up2">
                            <input type="text" name="email" th:value="${customer.getEmail()}">
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="sign-u">
                        <div class="sign-up1">
                            <h4>公司 :</h4>
                        </div>
                        <div class="sign-up2">
                            <input type="text" name="company" th:value="${customer.getCompany()}">
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="sign-u">
                        <div class="sign-up1">
                            <h4>地址 :</h4>
                        </div>
                        <div class="sign-up2">
                            <input type="text" name="address" th:value="${customer.getAddress()}">
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="sign-u">
                        <div class="sign-up1">
                            <h4>客户等级 :</h4>
                        </div>
                        <div class="sign-up2">
                            <select name="level" class="form-control">
<!--                                <option>请选择</option>-->
                                <option value="普通客户" th:selected="${customer.getLevel() eq ('普通客户')?true:false}">普通客户</option>
                                <option value="VIP客户" th:selected="${customer.getLevel() eq ('VIP客户')?true:false}">VIP客户</option>
                                <option value="潜在客户" th:selected="${customer.getLevel() eq ('潜在客户')?true:false}">潜在客户</option>
                            </select>
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="sign-u">
                        <div class="sign-up1">
                            <h4>客户渠道 :</h4>
                        </div>
                        <div class="sign-up2">
                            <select name="channel" class="form-control" th:checked="${customer.getChannel()}">
<!--                                <option>请选择</option>-->
                                <option value="客服录入" th:selected="${customer.getChannel() eq ('客服介入')}">客服录入</option>
                                <option value="网页介入" th:selected="${customer.getChannel() eq ('网页介入')}">网页介入</option>
                            </select>
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="sign-u">
                        <div class="sign-up1">
                            <h4>标记 :</h4>
                        </div>
                        <div class="sign-up2">
                            <input type="text" name="remark" th:value="${customer.getRemark()}">
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="sub_home">
                        <input type="submit" value="修改信息" id="submit">
                        <div class="clearfix"> </div>
                    </div>
                </form>
                <script>
                    function validate() {
                        var pw1 = document.getElementById("pw1").value;
                        var pw2 = document.getElementById("pw2").value;
                        if(pw1 == pw2) {
                            document.getElementById("tishi").innerHTML="<font color='green'>两次密码相同</font>";
                            document.getElementById("submit").disabled = false;
                        }
                        else {
                            document.getElementById("tishi").innerHTML="<font color='red'>两次密码不相同</font>";
                            document.getElementById("submit").disabled = true;
                        }
                    }
                </script>
            </div>
        </div>
    </div>
</div>
<!-- Classie -->
<script src="js/classie.js"></script>
<script>
    var menuLeft = document.getElementById( 'cbp-spmenu-s1' ),
        showLeftPush = document.getElementById( 'showLeftPush' ),
        body = document.body;

    showLeftPush.onclick = function() {
        classie.toggle( this, 'active' );
        classie.toggle( body, 'cbp-spmenu-push-toright' );
        classie.toggle( menuLeft, 'cbp-spmenu-open' );
        disableOther( 'showLeftPush' );
    };

    function disableOther( button ) {
        if( button !== 'showLeftPush' ) {
            classie.toggle( showLeftPush, 'disabled' );
        }
    }
</script>
<!--scrolling js-->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!--//scrolling js-->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.js"> </script>
</body>
</html>